﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BacteriaSimulation.Simulation
{
    public abstract class BacteriumSimulationStrategy
    {
        protected DietType diet;
        public DietType Diet
        {
            get
            {
                return diet;
            }
        }

        protected readonly SimulationEnvironment Environment;
        public void PerformSimulationStep(Bacterium bacterium, SimulationEnvironment env)
        {
            if (bacterium.State == BacteriumState.DEAD)
            {
                return;
            }

            PerformStrategy(bacterium, env);
        }

        public abstract void PerformStrategy(Bacterium bacterium, SimulationEnvironment env);
        public abstract void WallCollisionDetected(Bacterium bacterium, WALL_COLLISION_TYPE collisionType, SimulationEnvironment env);
        public abstract void BacteriumCollisionDetected(Bacterium bacterium, Bacterium collidedBacterium, SimulationEnvironment env);
    }
}
